<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * Class CreateStaffPeriodFeeDetailsTable.
 */
class CreateStaffPeriodFeeDetailsTable extends Migration
{
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('staff_period_fee_details', function(Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('staff_period_fee_id')->nullable();
            $table->unsignedInteger('staff_id');
            $table->unsignedInteger('dorm_id');
            $table->unsignedInteger('period_id');
            $table->integer('staff_person_days');
            $table->integer('dorm_person_days');
            $table->decimal('total_resource_consume',10,2);
            $table->decimal('total_money',10,2);
            $table->unsignedInteger('fee_id')->nullable();
            $table->string('fee_type')->nullable();
            $table->decimal('fee_undertake');
            $table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('staff_period_fee_details');
	}
}
